package com.lingnan.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import jakarta.validation.constraints.*;

import java.util.Date;


@Data
public class CompanyHr {
    @TableId(type = IdType.AUTO)
    private Long id;

    @NotNull(message = "企业ID不能为空")
    private Long companyId;

    @NotNull(message = "用户账户ID不能为空")
    private Long userAccountId;

    @NotBlank(message = "HR姓名不能为空")
    @Size(max = 50, message = "HR姓名长度不能超过50个字符")
    private String name;

    @Size(max = 50, message = "HR职位长度不能超过50个字符")
    private String position;

    @Email(message = "联系邮箱格式不正确")
    @Size(max = 100, message = "联系邮箱长度不能超过100个字符")
    private String contactEmail;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "联系电话格式不正确")
    private String contactPhone;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;
    private Long updateId;

}